add refernce to application assembly in the designer

edited April 2011 in FastReport .NET
I read in the user manual that I can add reference to my application's assembly (dll or exe) in the report designer. What is not clear is:

1- where to copy the actual assembly file of my application so that the designer can reference the assembly's name-spcae in its code/expressions?

2- Is there a way to tell the the fast-report designer to reference my assembly file directly from a folder location or is this done only by code?

3- what code to use for the previous point?

I tried compiling and running the sample (C:\Program Files\FastReports\FastReport.Net\Demos\C#\UserFunctions) but it keeps giving me two compiling errors
"The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)" for the two using statements
using FastReport.Utils;
using FastReport;

Note: maybe it helps to know I am using VS2010. The demo "UserFunctions" was migrated to VS2010 using VS's migration wizard before trying to run the demo from VS.Net 2010

Comments

  • edited 7:31AM
    I read in the user manual that I can add reference to my application's assembly (dll or exe) in the report designer. What is not clear is:

    1- where to copy the actual assembly file of my application so that the designer can reference the assembly's name-spcae in its code/expressions?

    2- Is there a way to tell the the fast-report designer to reference my assembly file directly from a folder location or is this done only by code?

    3- what code to use for the previous point?

    I tried compiling and running the sample (C:\Program Files\FastReports\FastReport.Net\Demos\C#\UserFunctions) but it keeps giving me two compiling errors
    "The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)" for the two using statements
    using FastReport.Utils;
    using FastReport;

    Note: maybe it helps to know I am using VS2010. The demo "UserFunctions" was migrated to VS2010 using VS's migration wizard before trying to run the demo from VS.Net 2010

    I attempted the following:
    1- I created a class library project (MoonlightUtils) with a default namespace (Moonlight.Utils)

    2- then copied the generated MoonllightUtils.dll to my LIB folder

    3- in FastReport designer, I added a reference to the MoonlightUtils.dll file from the LIB folder

    4- in FastReport's script window, I added the using statement (using Moonlight.Utils;)

    5- when I try to preview the report I get the following message in FR (attached screen capture shows the same)
    Error CS0006: Metadata file 'MoonlightUtils.dll' could not be found

    What am I missing here ?? >
  • edited 7:31AM
    I read in the user manual that I can add reference to my application's assembly (dll or exe) in the report designer. What is not clear is:

    1- where to copy the actual assembly file of my application so that the designer can reference the assembly's name-spcae in its code/expressions?

    2- Is there a way to tell the the fast-report designer to reference my assembly file directly from a folder location or is this done only by code?

    3- what code to use for the previous point?

    I tried compiling and running the sample (C:\Program Files\FastReports\FastReport.Net\Demos\C#\UserFunctions) but it keeps giving me two compiling errors
    "The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)" for the two using statements
    using FastReport.Utils;
    using FastReport;

    Note: maybe it helps to know I am using VS2010. The demo "UserFunctions" was migrated to VS2010 using VS's migration wizard before trying to run the demo from VS.Net 2010

    I attempted the following:
    1- I created a class library project (MoonlightUtils) with a default namespace (Moonlight.Utils)

    2- then copied the generated MoonllightUtils.dll to my LIB folder

    3- in FastReport designer, I added a reference to the MoonlightUtils.dll file from the LIB folder

    4- in FastReport's script window, I added the using statement (using Moonlight.Utils;)

    5- when I try to preview the report I get the following message in FR (attached screen capture shows the same)
    Error CS0006: Metadata file 'MoonlightUtils.dll' could not be found

    What am I missing here ?? >

    Got the hint from the forum, I copied my MoonlightUtils.dll to FR's folder "C:\Program Files\FastReports\FastReport.Net" and now I can call my util functions from FR's script.

    Next thing I need to do is how to register my util functions in FR's data window.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.